package com.ruoyi.huoyun.bargain.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.huoyun.bargain.mapper.PaymentAgreementInfoMapper;
import com.ruoyi.huoyun.bargain.domain.PaymentAgreementInfo;
import com.ruoyi.huoyun.bargain.service.IPaymentAgreementInfoService;

/**
 * 支付协议Service业务层处理
 *
 * @author mj
 * @date 2021-11-29
 */
@Service
public class PaymentAgreementInfoServiceImpl implements IPaymentAgreementInfoService
{
    @Autowired
    private PaymentAgreementInfoMapper paymentAgreementInfoMapper;

    /**
     * 查询支付协议
     *
     * @param paymentAgreementId 支付协议主键
     * @return 支付协议
     */
    @Override
    public PaymentAgreementInfo selectPaymentAgreementInfoByPaymentAgreementId(Integer paymentAgreementId)
    {
        return paymentAgreementInfoMapper.selectPaymentAgreementInfoByPaymentAgreementId(paymentAgreementId);
    }

    /**
     * 查询支付协议列表
     *
     * @param paymentAgreementInfo 支付协议
     * @return 支付协议
     */
    @Override
    public List<PaymentAgreementInfo> selectPaymentAgreementInfoList(PaymentAgreementInfo paymentAgreementInfo)
    {
        return paymentAgreementInfoMapper.selectPaymentAgreementInfoList(paymentAgreementInfo);
    }

    /**
     * 新增支付协议
     *
     * @param paymentAgreementInfo 支付协议
     * @return 结果
     */
    @Override
    public int insertPaymentAgreementInfo(PaymentAgreementInfo paymentAgreementInfo)
    {
        return paymentAgreementInfoMapper.insertPaymentAgreementInfo(paymentAgreementInfo);
    }

    /**
     * 修改支付协议
     *
     * @param paymentAgreementInfo 支付协议
     * @return 结果
     */
    @Override
    public int updatePaymentAgreementInfo(PaymentAgreementInfo paymentAgreementInfo)
    {
        return paymentAgreementInfoMapper.updatePaymentAgreementInfo(paymentAgreementInfo);
    }

    /**
     * 批量删除支付协议
     *
     * @param paymentAgreementIds 需要删除的支付协议主键
     * @return 结果
     */
    @Override
    public int deletePaymentAgreementInfoByPaymentAgreementIds(Integer[] paymentAgreementIds)
    {
        return paymentAgreementInfoMapper.deletePaymentAgreementInfoByPaymentAgreementIds(paymentAgreementIds);
    }

    /**
     * 删除支付协议信息
     *
     * @param paymentAgreementId 支付协议主键
     * @return 结果
     */
    @Override
    public int deletePaymentAgreementInfoByPaymentAgreementId(Integer paymentAgreementId)
    {
        return paymentAgreementInfoMapper.deletePaymentAgreementInfoByPaymentAgreementId(paymentAgreementId);
    }
}
